package com.dayouzi.crawler_monitor.mapper;

import com.dayouzi.crawler_monitor.pojo.entity.Crawler;
import com.dayouzi.crawler_monitor.pojo.entity.CrawlerDetail;
import com.dayouzi.crawler_monitor.pojo.query.CrawlerListQuery;
import com.dayouzi.crawler_monitor.pojo.vo.AnalyData;
import com.dayouzi.crawler_monitor.pojo.vo.AnalysisListVO;
import com.dayouzi.crawler_monitor.pojo.vo.CrawlerListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;


@Mapper
@Repository
public interface AnalysisMapper {

    List<AnalyData> getOptionBySevenDay(@Param("id") Integer id, @Param("date") String date);

    List<AnalyData> getOptionBy24Hour(@Param("id") Integer id, @Param("date") String date);

    List<AnalysisListVO> listPage(CrawlerListQuery crawlerListQuery);

    List<HashMap<String, Integer>> getOptionByPieClass(@Param("id") Integer id, @Param("date") String date);

    List<HashMap<String, Integer>> getOptionByPieStatus(@Param("id") Integer id, @Param("date") String date);

    Crawler getCrawlerDetail(Integer id);
}
